#-------------------------------------------------------------------------------
# Name:        FontHandler
# Purpose:
#
# Author:      Michael Blackwood
#
# Created:     03/12/2013
# Copyright:   (c) Monxcleyr Productions 2013
# Licence:     GPL v3
#-------------------------------------------------------------------------------
#!/usr/bin/env python

import pygame, logging

class FontHandler():

  def __init__(self):

    self.fonts = {}


  def getFont(self, font, size):

    if (font, size) not in self.fonts:
      self.fonts[(font, 12)] = pygame.font.Font(font, size)
      return self.fonts[(font, size)]

  def getFontByTuple(self, font):

    if font not in self.fonts:
      self.fonts[font] = pygame.font.Font(font[0], font[1])
    return self.fonts[font]


  def reset(self):

    self.fonts = {}

